import java.util.Comparator;


public class ComparatorFreeShips implements Comparator<RainmanPlanet> {

	public int compare(RainmanPlanet p1, RainmanPlanet p2){
		
		if(p1.freeShips < p2.freeShips){
			return -1;
		}
		if(p1.freeShips > p2.freeShips){
			return 1;
		}
		return 0;
	} 
	
}